<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@include file="../../mytags.jsp" %>
<t:base type="jquery"></t:base>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="webpage/com/wx/wx-plug-in/plugin/picker/css/mui.picker.all.css">
    <script type="text/javascript" src="webpage/com/wx/wx-plug-in/plugin/picker/js/mui.picker.all.js"></script>
    <title>${contact.name}</title>

</head>
<body>
<div class="eq1">
    <div class="geren" style="font-weight: bold;margin:10px 0px 10px 15px;">
        <img src="${webRoot }/images/about.jpg">联系人信息
    </div>
    <div class="inrr inrr1 inrr2 inrr-plus">
        <h4><span>姓名</span>${contact.name}&nbsp;</h4>
        <h4><span>手机</span>${contact.cellphone1}&nbsp;</h4>
        <%--<h4><span>手机2</span>${contact.cellphone2}&nbsp;</h4>--%>
        <h4><span>固话</span> ${contact.telephone}&nbsp;</h4>
        <h4><span>传真</span>${contact.fax}&nbsp;</h4>
        <h4><span>邮箱地址</span>${contact.email}&nbsp;</h4>
        <h4><span>职位</span>
            <t:dictSelect field="position" type="span" typeGroupCode="<%=StaticValue.DIC_CINEMA_DEPART %>"
                          defaultVal="${contact.position}"/>
            &nbsp;</h4>
        <h4><span>状态</span>
            <t:dictSelect field="position" type="span" typeGroupCode="engineer_state" defaultVal="${contact.state}"/>
            &nbsp;</h4>
    </div>
</div>
</body>
<script type="text/javascript" charset="utf-8">
    mui.init();
    function setState(flag) {
        $.post("zyContactsController.do?setState", {
            id: '${contact.id}',
            state: flag == 1 ? '<%=StaticValue.DIC_ENGINEER_STATE_ONJOB%>' : '<%=StaticValue.DIC_ENGINEER_STATE_QUIT%>'
        }, function (data) {
            if (!$.isEmptyObject(data)) {
                data = $.parseJSON(data);
                if (data.success) {
                    mui.openWindow({
                        createNew: true,
                        url: "zyContactsController.do?wxDetail&id=${contact.id}"
                    });
                } else {
                    mui.alert("状态更新失败");
                }
            }
        })
    }
</script>
</html>